These simulations were run in July 2019, using the “fast” (lisp) version of the code.
First, we load the file produced by the fast simulations (in this case, fast\simulations1.txt).
data <- read.csv(unzip("fast/simulations1/merged.zip"))
Because of a coding bug, the variable RetrievedV, which tracks the V value of the chunk being retrieved, was accidentally named Chunk. We can easily fix that.
data <- rename(data, RetrievedV = ChunkV)
Timestamps vary a bit because of the different retrieval times, which change as function of similarity, history, noise, and any other factor that affects a chunk’s activation level.
To account fo this, we will round up the Time variable to the hundreds. We wil also create a second variable, Day, which will be an approximation of Time, further rounding up 25 consecutive time points. That corresponds to roughly a simulated day (12.5) for the model, not accounting for day/night cycles.
Finally, we will offset the Day variable so that the PTE occurrs when Day is zero.
data$Time <- round(data$Time/100)
data$Day <- round(data$Time/25, 0)
data$Day <- data$Day - 12
At this point, we have sufficient time points for each value of Day to plot smooth, rather than choppy, data lines. As a first step, we will average the values of V and Similarity across the different Day values and values of the traumatic event PTEV.
a <- aggregate(data[c("RetrievedV", "ChunkSimilarity", "Traumatic")],
list(Day=data$Day, PTEV=data$PTEV,
S=data$PTES, W=data$IMAGINAL.ACTIVATION,
BLL=data$BLL),
mean)
a$PTEV <- as.factor(a$PTEV)
a$S <- as.factor(a$S)
a$W <- as.factor(a$W)
a$BLL <- as.factor(a$BLL)
In this and the other graphs, we will visualize the effects of different values of PTEV across different measurs of similarity S betweenthe traumatic event and the daily events (left to right) and across different measures W of working memory capacity. Different 5 by 5 grids will generated for different levels of mekory decay BLL:
for (bll in unique(a$BLL)) {
p<-ggplot(subset(a, a$BLL == bll), aes(x=Day, y=Traumatic, col=PTEV)) +
stat_summary(fun.data = mean_se, geom="line") +
facet_wrap(~W * ~S) +
theme_linedraw() +
ggtitle(paste("Decay rate =", bll))
print(p)
}
Now, we can consider how how the model fares, after the PTE, for different values of PTEV. First, we will consider the model’s well-being. That is captured by the RetrievedV variable, which captues the mean value of the memories being retrieved. Increased retrieval of traumatic memories leads, of course, to increased RetrievedV values.
for (bll in unique(a$BLL)) {
p<-ggplot(subset(a, a$BLL == bll), aes(x=Day, y=RetrievedV, col=PTEV)) +
stat_summary(fun.data = mean_se, geom="line") +
facet_wrap(~W * ~S) +
theme_linedraw() +
ggtitle(paste("Decay rate =", bll))
print(p)
}
We can also consider how well the model is doing cognitively. This is measured by the ChunkSimilarity between the retrieved response and the current context. As memories become more intrusive, the similarity is expected to decrease. Decreased similarity means that the response made is not as relevant to the current context.
for (bll in unique(a$BLL)) {
p<-ggplot(subset(a, a$BLL == bll), aes(x=Day, y=ChunkSimilarity, col=PTEV)) +
stat_summary(fun.data = mean_se, geom="line") +
facet_wrap(~W * ~S) +
theme_linedraw() +
ggtitle(paste("Decay rate =", bll))
print(p)
}